package com.sky.service;

import com.sky.dto.*;
import com.sky.result.PageResult;
import com.sky.vo.*;

import java.time.LocalDate;

public interface OrderService {


    void reMinderById(Integer id);

    OrderSubmitVO submit(OrdersSubmitDTO submitDTO);


    /**
     * 订单支付
     * @param ordersPaymentDTO
     * @return
     */
    OrderPaymentVO payment(OrdersPaymentDTO ordersPaymentDTO) throws Exception;

    /**
     * 支付成功，修改订单状态
     * @param outTradeNo
     */
    void paySuccess(String outTradeNo);


    //===================================================================day09 实战在下面

    /**
     * 订单分页查
     * @param dto
     */
    PageResult getOrder(OrdersPageQueryDTO dto);

    /**
     * 订单状态改成3（待派送）
     * @param dto
     * @return
     */
    void updateStatus(OrdersConfirmDTO dto);

    /**
     * 根据订单id查询订单详情
     * @param id
     */
    OrderVO getOrderDetailById(Integer id);


    void updateDispatchOrdersStatus(Long id);

    void updateCompleteOrdersStatus(Long id);

    void updateCancelOrdersStatus(OrdersCancelDTO dto) throws Exception;

    void updateRejectionOrder(OrdersRejectionDTO dto);

    OrderStatisticsVO statisticsOrders();


    /**
     * 用户端查询历史订单
     */
    PageResult getHistoryOrders(Integer page, Integer pageSize, Integer status);

    void CancelOrdersStatus(Integer id);

    void reOrder(Integer id);

    TurnoverReportVO turnoverStatistics(LocalDate begin, LocalDate end);

    UserReportVO userStatistics(LocalDate begin, LocalDate end);

    OrderReportVO ordersStatistics(LocalDate begin, LocalDate end);

    SalesTop10ReportVO top10(LocalDate begin, LocalDate end);
}
